package com.smt.ejb3.tutoria.entitybean.one2one.fk;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

@Entity
public class CustomerNo1 implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private int id;
	private String sn;
	private Customer1 customer;
	
	@Id
	@Column(name="CUSTNO_ID")
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="SN")
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	@OneToOne(mappedBy="custNo")
	public Customer1 getCustomer() {
		return customer;
	}
	public void setCustomer(Customer1 customer) {
		this.customer = customer;
	}
	
	
}
